{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "autoscroll": false,
    "ein.hycell": false,
    "ein.tags": "worksheet-0",
    "slideshow": {
     "slide_type": "-"
    }
   },
   "outputs": [],
   "source": [
    "import gzip\n",
    "import pickle\n",
    "\n",
    "import numpy as np\n",
    "import graphviz\n",
    "from sklearn import tree"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "autoscroll": false,
    "ein.hycell": false,
    "ein.tags": "worksheet-0",
    "slideshow": {
     "slide_type": "-"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Coverage',\n",
       " 'DP',\n",
       " 'FS',\n",
       " 'HRun',\n",
       " 'HaplotypeScore',\n",
       " 'MQ',\n",
       " 'QD',\n",
       " 'QUAL',\n",
       " 'ReadPosRankSum']"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "balanced_fit = np.load(gzip.open('balanced_fit.npy.gz', 'rb'))\n",
    "ordered_features = pickle.load(open('ordered_features', 'rb'))\n",
    "ordered_features"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ein.tags": "worksheet-0",
    "slideshow": {
     "slide_type": "-"
    }
   },
   "source": [
    "# Decision Tree"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "autoscroll": false,
    "ein.hycell": false,
    "ein.tags": "worksheet-0",
    "slideshow": {
     "slide_type": "-"
    }
   },
   "outputs": [],
   "source": [
    "train_X = balanced_fit[:,:-2]  #POS and errors\n",
    "train_Y = balanced_fit[:,-1]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "autoscroll": false,
    "ein.hycell": false,
    "ein.tags": "worksheet-0",
    "slideshow": {
     "slide_type": "-"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.00148319, 0.        , 0.01766789, 0.        , 0.        ,\n",
       "       0.        , 0.00268066, 0.97045318, 0.00771508])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "estimator = tree.DecisionTreeClassifier(max_depth=4)\n",
    "tree_fit = estimator.fit(train_X, train_Y)\n",
    "tree_fit.feature_importances_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "autoscroll": false,
    "ein.hycell": false,
    "ein.tags": "worksheet-0",
    "slideshow": {
     "slide_type": "-"
    }
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
       " -->\n",
       "<!-- Title: Tree Pages: 1 -->\n",
       "<svg width=\"1411pt\" height=\"500pt\"\n",
       " viewBox=\"0.00 0.00 1410.96 500.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 496)\">\n",
       "<title>Tree</title>\n",
       "<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-496 1406.96,-496 1406.96,4 -4,4\"/>\n",
       "<!-- 0 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>0</title>\n",
       "<path fill=\"transparent\" stroke=\"#000000\" d=\"M820.5269,-492C820.5269,-492 669.6938,-492 669.6938,-492 663.6938,-492 657.6938,-486 657.6938,-480 657.6938,-480 657.6938,-426 657.6938,-426 657.6938,-420 663.6938,-414 669.6938,-414 669.6938,-414 820.5269,-414 820.5269,-414 826.5269,-414 832.5269,-420 832.5269,-426 832.5269,-426 832.5269,-480 832.5269,-480 832.5269,-486 826.5269,-492 820.5269,-492\"/>\n",
       "<text text-anchor=\"start\" x=\"701.0562\" y=\"-476.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">QUAL ≤ 0.005</text>\n",
       "<text text-anchor=\"start\" x=\"716.5054\" y=\"-462.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.5</text>\n",
       "<text text-anchor=\"start\" x=\"683.8159\" y=\"-448.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 1082975</text>\n",
       "<text text-anchor=\"start\" x=\"665.9023\" y=\"-434.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [541287, 541688]</text>\n",
       "<text text-anchor=\"start\" x=\"706.4053\" y=\"-420.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>1</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.937255\" stroke=\"#000000\" d=\"M638.2406,-378C638.2406,-378 495.9801,-378 495.9801,-378 489.9801,-378 483.9801,-372 483.9801,-366 483.9801,-366 483.9801,-312 483.9801,-312 483.9801,-306 489.9801,-300 495.9801,-300 495.9801,-300 638.2406,-300 638.2406,-300 644.2406,-300 650.2406,-306 650.2406,-312 650.2406,-312 650.2406,-366 650.2406,-366 650.2406,-372 644.2406,-378 638.2406,-378\"/>\n",
       "<text text-anchor=\"start\" x=\"532.917\" y=\"-362.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">FS ≤ 3.817</text>\n",
       "<text text-anchor=\"start\" x=\"531.2354\" y=\"-348.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.113</text>\n",
       "<text text-anchor=\"start\" x=\"509.709\" y=\"-334.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 533065</text>\n",
       "<text text-anchor=\"start\" x=\"491.7954\" y=\"-320.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [500885, 32180]</text>\n",
       "<text text-anchor=\"start\" x=\"533.0708\" y=\"-306.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M683.8528,-413.7677C668.6645,-404.0403 652.2784,-393.5458 636.7228,-383.5832\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"638.4878,-380.5574 628.1791,-378.1115 634.7125,-386.4521 638.4878,-380.5574\"/>\n",
       "<text text-anchor=\"middle\" x=\"633.5315\" y=\"-398.3318\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">True</text>\n",
       "</g>\n",
       "<!-- 16 -->\n",
       "<g id=\"node17\" class=\"node\">\n",
       "<title>16</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.921569\" stroke=\"#000000\" d=\"M1000.3312,-378C1000.3312,-378 833.8895,-378 833.8895,-378 827.8895,-378 821.8895,-372 821.8895,-366 821.8895,-366 821.8895,-312 821.8895,-312 821.8895,-306 827.8895,-300 833.8895,-300 833.8895,-300 1000.3312,-300 1000.3312,-300 1006.3312,-300 1012.3312,-306 1012.3312,-312 1012.3312,-312 1012.3312,-366 1012.3312,-366 1012.3312,-372 1006.3312,-378 1000.3312,-378\"/>\n",
       "<text text-anchor=\"start\" x=\"830\" y=\"-362.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">ReadPosRankSum ≤ &#45;0.305</text>\n",
       "<text text-anchor=\"start\" x=\"880.7192\" y=\"-348.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.136</text>\n",
       "<text text-anchor=\"start\" x=\"859.709\" y=\"-334.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 549910</text>\n",
       "<text text-anchor=\"start\" x=\"841.7954\" y=\"-320.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [40402, 509508]</text>\n",
       "<text text-anchor=\"start\" x=\"878.4053\" y=\"-306.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;16 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>0&#45;&gt;16</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M804.303,-413.7677C818.8435,-404.1303 834.5201,-393.7401 849.4267,-383.8601\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"851.6983,-386.5535 858.1001,-378.1115 847.8311,-380.7187 851.6983,-386.5535\"/>\n",
       "<text text-anchor=\"middle\" x=\"853.1313\" y=\"-398.4127\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">False</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>2</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.956863\" stroke=\"#000000\" d=\"M374.3312,-264C374.3312,-264 207.8895,-264 207.8895,-264 201.8895,-264 195.8895,-258 195.8895,-252 195.8895,-252 195.8895,-198 195.8895,-198 195.8895,-192 201.8895,-186 207.8895,-186 207.8895,-186 374.3312,-186 374.3312,-186 380.3312,-186 386.3312,-192 386.3312,-198 386.3312,-198 386.3312,-252 386.3312,-252 386.3312,-258 380.3312,-264 374.3312,-264\"/>\n",
       "<text text-anchor=\"start\" x=\"204\" y=\"-248.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">ReadPosRankSum ≤ &#45;2.372</text>\n",
       "<text text-anchor=\"start\" x=\"254.7192\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.081</text>\n",
       "<text text-anchor=\"start\" x=\"233.709\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 500632</text>\n",
       "<text text-anchor=\"start\" x=\"216.3115\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [479502, 21130]</text>\n",
       "<text text-anchor=\"start\" x=\"257.0708\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;2 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>1&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M483.927,-304.6416C455.9985,-293.106 424.4933,-280.093 395.1683,-267.9805\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"396.3099,-264.6652 385.7311,-264.0825 393.6376,-271.1351 396.3099,-264.6652\"/>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>9</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.482353\" stroke=\"#000000\" d=\"M633.922,-264C633.922,-264 500.2987,-264 500.2987,-264 494.2987,-264 488.2987,-258 488.2987,-252 488.2987,-252 488.2987,-198 488.2987,-198 488.2987,-192 494.2987,-186 500.2987,-186 500.2987,-186 633.922,-186 633.922,-186 639.922,-186 645.922,-192 645.922,-198 645.922,-198 645.922,-252 645.922,-252 645.922,-258 639.922,-264 633.922,-264\"/>\n",
       "<text text-anchor=\"start\" x=\"529.0239\" y=\"-248.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">FS ≤ 10.512</text>\n",
       "<text text-anchor=\"start\" x=\"530.7192\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.449</text>\n",
       "<text text-anchor=\"start\" x=\"513.6021\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 32433</text>\n",
       "<text text-anchor=\"start\" x=\"496.2046\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [21383, 11050]</text>\n",
       "<text text-anchor=\"start\" x=\"533.0708\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;9 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>1&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M567.1104,-299.7677C567.1104,-291.6172 567.1104,-282.9283 567.1104,-274.4649\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"570.6104,-274.3046 567.1104,-264.3046 563.6104,-274.3047 570.6104,-274.3046\"/>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.117647\" stroke=\"#000000\" d=\"M178.3312,-150C178.3312,-150 11.8895,-150 11.8895,-150 5.8895,-150 -.1105,-144 -.1105,-138 -.1105,-138 -.1105,-84 -.1105,-84 -.1105,-78 5.8895,-72 11.8895,-72 11.8895,-72 178.3312,-72 178.3312,-72 184.3312,-72 190.3312,-78 190.3312,-84 190.3312,-84 190.3312,-138 190.3312,-138 190.3312,-144 184.3312,-150 178.3312,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"8\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">ReadPosRankSum ≤ &#45;3.095</text>\n",
       "<text text-anchor=\"start\" x=\"58.7192\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.498</text>\n",
       "<text text-anchor=\"start\" x=\"45.4951\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 4422</text>\n",
       "<text text-anchor=\"start\" x=\"31.4746\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [2350, 2072]</text>\n",
       "<text text-anchor=\"start\" x=\"61.0708\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>2&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M223.9325,-185.9272C206.9464,-176.0475 188.5849,-165.3678 171.1939,-155.2527\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"172.6044,-152.0241 162.2004,-150.0218 169.0849,-158.075 172.6044,-152.0241\"/>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>6</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.960784\" stroke=\"#000000\" d=\"M362.2406,-150C362.2406,-150 219.9801,-150 219.9801,-150 213.9801,-150 207.9801,-144 207.9801,-138 207.9801,-138 207.9801,-84 207.9801,-84 207.9801,-78 213.9801,-72 219.9801,-72 219.9801,-72 362.2406,-72 362.2406,-72 368.2406,-72 374.2406,-78 374.2406,-84 374.2406,-84 374.2406,-138 374.2406,-138 374.2406,-144 368.2406,-150 362.2406,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"256.917\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">FS ≤ 0.207</text>\n",
       "<text text-anchor=\"start\" x=\"254.7192\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.074</text>\n",
       "<text text-anchor=\"start\" x=\"233.709\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 496210</text>\n",
       "<text text-anchor=\"start\" x=\"215.7954\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [477152, 19058]</text>\n",
       "<text text-anchor=\"start\" x=\"257.0708\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;6 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>2&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M291.1104,-185.7677C291.1104,-177.6172 291.1104,-168.9283 291.1104,-160.4649\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"294.6104,-160.3046 291.1104,-150.3046 287.6104,-160.3047 294.6104,-160.3046\"/>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>4</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M74.1104,-36C74.1104,-36 44.1104,-36 44.1104,-36 38.1104,-36 32.1104,-30 32.1104,-24 32.1104,-24 32.1104,-12 32.1104,-12 32.1104,-6 38.1104,0 44.1104,0 44.1104,0 74.1104,0 74.1104,0 80.1104,0 86.1104,-6 86.1104,-12 86.1104,-12 86.1104,-24 86.1104,-24 86.1104,-30 80.1104,-36 74.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"59.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;4 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>3&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M79.9474,-71.8292C76.5594,-63.0768 73.0339,-53.9691 69.8673,-45.7887\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"73.0901,-44.4186 66.2161,-36.3565 66.5621,-46.9456 73.0901,-44.4186\"/>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>5</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M146.1104,-36C146.1104,-36 116.1104,-36 116.1104,-36 110.1104,-36 104.1104,-30 104.1104,-24 104.1104,-24 104.1104,-12 104.1104,-12 104.1104,-6 110.1104,0 116.1104,0 116.1104,0 146.1104,0 146.1104,0 152.1104,0 158.1104,-6 158.1104,-12 158.1104,-12 158.1104,-24 158.1104,-24 158.1104,-30 152.1104,-36 146.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"131.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 3&#45;&gt;5 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>3&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M110.2733,-71.8292C113.6613,-63.0768 117.1868,-53.9691 120.3534,-45.7887\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"123.6586,-46.9456 124.0046,-36.3565 117.1306,-44.4186 123.6586,-46.9456\"/>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>7</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M280.1104,-36C280.1104,-36 250.1104,-36 250.1104,-36 244.1104,-36 238.1104,-30 238.1104,-24 238.1104,-24 238.1104,-12 238.1104,-12 238.1104,-6 244.1104,0 250.1104,0 250.1104,0 280.1104,0 280.1104,0 286.1104,0 292.1104,-6 292.1104,-12 292.1104,-12 292.1104,-24 292.1104,-24 292.1104,-30 286.1104,-36 280.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"265.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;7 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>6&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M280.1594,-71.8292C277.7394,-63.173 275.2222,-54.1692 272.9547,-46.0587\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"276.3055,-45.0448 270.2423,-36.3565 269.564,-46.9296 276.3055,-45.0448\"/>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>8</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M352.1104,-36C352.1104,-36 322.1104,-36 322.1104,-36 316.1104,-36 310.1104,-30 310.1104,-24 310.1104,-24 310.1104,-12 310.1104,-12 310.1104,-6 316.1104,0 322.1104,0 322.1104,0 352.1104,0 352.1104,0 358.1104,0 364.1104,-6 364.1104,-12 364.1104,-12 364.1104,-24 364.1104,-24 364.1104,-30 358.1104,-36 352.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"337.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 6&#45;&gt;8 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>6&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M310.4852,-71.8292C314.8619,-62.9806 319.4182,-53.7689 323.4986,-45.5193\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"326.7344,-46.8717 328.0308,-36.3565 320.46,-43.7682 326.7344,-46.8717\"/>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>10</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.674510\" stroke=\"#000000\" d=\"M570.3312,-150C570.3312,-150 403.8895,-150 403.8895,-150 397.8895,-150 391.8895,-144 391.8895,-138 391.8895,-138 391.8895,-84 391.8895,-84 391.8895,-78 397.8895,-72 403.8895,-72 403.8895,-72 570.3312,-72 570.3312,-72 576.3312,-72 582.3312,-78 582.3312,-84 582.3312,-84 582.3312,-138 582.3312,-138 582.3312,-144 576.3312,-150 570.3312,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"400\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">ReadPosRankSum ≤ &#45;2.269</text>\n",
       "<text text-anchor=\"start\" x=\"454.6123\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.37</text>\n",
       "<text text-anchor=\"start\" x=\"433.6021\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 22129</text>\n",
       "<text text-anchor=\"start\" x=\"419.5815\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [16712, 5417]</text>\n",
       "<text text-anchor=\"start\" x=\"453.0708\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;10 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>9&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M539.5789,-185.7677C533.4193,-176.9903 526.8214,-167.5883 520.455,-158.5161\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"523.3018,-156.4797 514.6926,-150.3046 517.5719,-160.5007 523.3018,-156.4797\"/>\n",
       "</g>\n",
       "<!-- 13 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>13</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.172549\" stroke=\"#000000\" d=\"M731.8821,-150C731.8821,-150 612.3386,-150 612.3386,-150 606.3386,-150 600.3386,-144 600.3386,-138 600.3386,-138 600.3386,-84 600.3386,-84 600.3386,-78 606.3386,-72 612.3386,-72 612.3386,-72 731.8821,-72 731.8821,-72 737.8821,-72 743.8821,-78 743.8821,-84 743.8821,-84 743.8821,-138 743.8821,-138 743.8821,-144 737.8821,-150 731.8821,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"608.7241\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">Coverage ≤ 21278.5</text>\n",
       "<text text-anchor=\"start\" x=\"635.7192\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.496</text>\n",
       "<text text-anchor=\"start\" x=\"618.6021\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 10304</text>\n",
       "<text text-anchor=\"start\" x=\"608.4746\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [4671, 5633]</text>\n",
       "<text text-anchor=\"start\" x=\"633.4053\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;13 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>9&#45;&gt;13</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M603.2454,-185.7677C611.5773,-176.7216 620.5203,-167.0121 629.112,-157.6839\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"631.7083,-160.0313 635.9087,-150.3046 626.5595,-155.2889 631.7083,-160.0313\"/>\n",
       "</g>\n",
       "<!-- 11 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>11</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M450.1104,-36C450.1104,-36 420.1104,-36 420.1104,-36 414.1104,-36 408.1104,-30 408.1104,-24 408.1104,-24 408.1104,-12 408.1104,-12 408.1104,-6 414.1104,0 420.1104,0 420.1104,0 450.1104,0 450.1104,0 456.1104,0 462.1104,-6 462.1104,-12 462.1104,-12 462.1104,-24 462.1104,-24 462.1104,-30 456.1104,-36 450.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"435.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;11 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>10&#45;&gt;11</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M465.2084,-71.8292C460.207,-62.8845 454.9982,-53.5686 450.3473,-45.2507\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"453.3094,-43.3766 445.3742,-36.3565 447.1996,-46.7929 453.3094,-43.3766\"/>\n",
       "</g>\n",
       "<!-- 12 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>12</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M522.1104,-36C522.1104,-36 492.1104,-36 492.1104,-36 486.1104,-36 480.1104,-30 480.1104,-24 480.1104,-24 480.1104,-12 480.1104,-12 480.1104,-6 486.1104,0 492.1104,0 492.1104,0 522.1104,0 522.1104,0 528.1104,0 534.1104,-6 534.1104,-12 534.1104,-12 534.1104,-24 534.1104,-24 534.1104,-30 528.1104,-36 522.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"507.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 10&#45;&gt;12 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>10&#45;&gt;12</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M495.5342,-71.8292C497.375,-63.2692 499.289,-54.3693 501.018,-46.3294\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"504.4819,-46.8688 503.1627,-36.3565 497.6384,-45.397 504.4819,-46.8688\"/>\n",
       "</g>\n",
       "<!-- 14 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>14</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M629.1104,-36C629.1104,-36 599.1104,-36 599.1104,-36 593.1104,-36 587.1104,-30 587.1104,-24 587.1104,-24 587.1104,-12 587.1104,-12 587.1104,-6 593.1104,0 599.1104,0 599.1104,0 629.1104,0 629.1104,0 635.1104,0 641.1104,-6 641.1104,-12 641.1104,-12 641.1104,-24 641.1104,-24 641.1104,-30 635.1104,-36 629.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"614.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 13&#45;&gt;14 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>13&#45;&gt;14</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M647.6812,-71.8292C642.0428,-62.7883 636.168,-53.3682 630.9383,-44.9827\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"633.8201,-42.9894 625.5585,-36.3565 627.8805,-46.6937 633.8201,-42.9894\"/>\n",
       "</g>\n",
       "<!-- 15 -->\n",
       "<g id=\"node16\" class=\"node\">\n",
       "<title>15</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M701.1104,-36C701.1104,-36 671.1104,-36 671.1104,-36 665.1104,-36 659.1104,-30 659.1104,-24 659.1104,-24 659.1104,-12 659.1104,-12 659.1104,-6 665.1104,0 671.1104,0 671.1104,0 701.1104,0 701.1104,0 707.1104,0 713.1104,-6 713.1104,-12 713.1104,-12 713.1104,-24 713.1104,-24 713.1104,-30 707.1104,-36 701.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"686.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 13&#45;&gt;15 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>13&#45;&gt;15</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M678.007,-71.8292C679.2956,-63.2692 680.6354,-54.3693 681.8457,-46.3294\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"685.3193,-46.7661 683.347,-36.3565 678.3973,-45.724 685.3193,-46.7661\"/>\n",
       "</g>\n",
       "<!-- 17 -->\n",
       "<g id=\"node18\" class=\"node\">\n",
       "<title>17</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.952941\" stroke=\"#000000\" d=\"M987.7085,-264C987.7085,-264 846.5122,-264 846.5122,-264 840.5122,-264 834.5122,-258 834.5122,-252 834.5122,-252 834.5122,-198 834.5122,-198 834.5122,-192 840.5122,-186 846.5122,-186 846.5122,-186 987.7085,-186 987.7085,-186 993.7085,-186 999.7085,-192 999.7085,-198 999.7085,-198 999.7085,-252 999.7085,-252 999.7085,-258 993.7085,-264 987.7085,-264\"/>\n",
       "<text text-anchor=\"start\" x=\"877.4688\" y=\"-248.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">QD ≤ 32.328</text>\n",
       "<text text-anchor=\"start\" x=\"880.7192\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.086</text>\n",
       "<text text-anchor=\"start\" x=\"859.709\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 264251</text>\n",
       "<text text-anchor=\"start\" x=\"842.3115\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [11845, 252406]</text>\n",
       "<text text-anchor=\"start\" x=\"878.4053\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 16&#45;&gt;17 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>16&#45;&gt;17</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M917.1104,-299.7677C917.1104,-291.6172 917.1104,-282.9283 917.1104,-274.4649\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"920.6104,-274.3046 917.1104,-264.3046 913.6104,-274.3047 920.6104,-274.3046\"/>\n",
       "</g>\n",
       "<!-- 24 -->\n",
       "<g id=\"node25\" class=\"node\">\n",
       "<title>24</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.890196\" stroke=\"#000000\" d=\"M1245.2406,-264C1245.2406,-264 1102.9801,-264 1102.9801,-264 1096.9801,-264 1090.9801,-258 1090.9801,-252 1090.9801,-252 1090.9801,-198 1090.9801,-198 1090.9801,-192 1096.9801,-186 1102.9801,-186 1102.9801,-186 1245.2406,-186 1245.2406,-186 1251.2406,-186 1257.2406,-192 1257.2406,-198 1257.2406,-198 1257.2406,-252 1257.2406,-252 1257.2406,-258 1251.2406,-264 1245.2406,-264\"/>\n",
       "<text text-anchor=\"start\" x=\"1134.4688\" y=\"-248.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">QD ≤ 36.016</text>\n",
       "<text text-anchor=\"start\" x=\"1141.6123\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.18</text>\n",
       "<text text-anchor=\"start\" x=\"1116.709\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 285659</text>\n",
       "<text text-anchor=\"start\" x=\"1098.7954\" y=\"-206.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [28557, 257102]</text>\n",
       "<text text-anchor=\"start\" x=\"1135.4053\" y=\"-192.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 16&#45;&gt;24 -->\n",
       "<g id=\"edge24\" class=\"edge\">\n",
       "<title>16&#45;&gt;24</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1005.1956,-299.9272C1029.805,-289.0109 1056.6162,-277.118 1081.4797,-266.0891\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1083.183,-269.1625 1090.9048,-261.9083 1080.3446,-262.7637 1083.183,-269.1625\"/>\n",
       "</g>\n",
       "<!-- 18 -->\n",
       "<g id=\"node19\" class=\"node\">\n",
       "<title>18</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.956863\" stroke=\"#000000\" d=\"M914.7085,-150C914.7085,-150 773.5122,-150 773.5122,-150 767.5122,-150 761.5122,-144 761.5122,-138 761.5122,-138 761.5122,-84 761.5122,-84 761.5122,-78 767.5122,-72 773.5122,-72 773.5122,-72 914.7085,-72 914.7085,-72 920.7085,-72 926.7085,-78 926.7085,-84 926.7085,-84 926.7085,-138 926.7085,-138 926.7085,-144 920.7085,-150 914.7085,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"788.377\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">QUAL ≤ 5172.575</text>\n",
       "<text text-anchor=\"start\" x=\"807.7192\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.082</text>\n",
       "<text text-anchor=\"start\" x=\"786.709\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 263416</text>\n",
       "<text text-anchor=\"start\" x=\"769.3115\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [11309, 252107]</text>\n",
       "<text text-anchor=\"start\" x=\"805.4053\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;18 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>17&#45;&gt;18</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M891.9879,-185.7677C886.4246,-177.0798 880.4696,-167.7801 874.7153,-158.794\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"877.6193,-156.8386 869.2791,-150.3046 871.7243,-160.6135 877.6193,-156.8386\"/>\n",
       "</g>\n",
       "<!-- 21 -->\n",
       "<g id=\"node22\" class=\"node\">\n",
       "<title>21</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.443137\" stroke=\"#000000\" d=\"M1060.8099,-150C1060.8099,-150 957.4108,-150 957.4108,-150 951.4108,-150 945.4108,-144 945.4108,-138 945.4108,-138 945.4108,-84 945.4108,-84 945.4108,-78 951.4108,-72 957.4108,-72 957.4108,-72 1060.8099,-72 1060.8099,-72 1066.8099,-72 1072.8099,-78 1072.8099,-84 1072.8099,-84 1072.8099,-138 1072.8099,-138 1072.8099,-144 1066.8099,-150 1060.8099,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"974.917\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">FS ≤ 0.082</text>\n",
       "<text text-anchor=\"start\" x=\"976.6123\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.46</text>\n",
       "<text text-anchor=\"start\" x=\"963.3882\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 835</text>\n",
       "<text text-anchor=\"start\" x=\"953.2607\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [536, 299]</text>\n",
       "<text text-anchor=\"start\" x=\"975.0708\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;21 -->\n",
       "<g id=\"edge21\" class=\"edge\">\n",
       "<title>17&#45;&gt;21</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M948.7715,-185.7677C955.9273,-176.9007 963.5975,-167.3964 970.988,-158.2385\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"973.8343,-160.2847 977.3908,-150.3046 968.3869,-155.8886 973.8343,-160.2847\"/>\n",
       "</g>\n",
       "<!-- 19 -->\n",
       "<g id=\"node20\" class=\"node\">\n",
       "<title>19</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M797.1104,-36C797.1104,-36 767.1104,-36 767.1104,-36 761.1104,-36 755.1104,-30 755.1104,-24 755.1104,-24 755.1104,-12 755.1104,-12 755.1104,-6 761.1104,0 767.1104,0 767.1104,0 797.1104,0 797.1104,0 803.1104,0 809.1104,-6 809.1104,-12 809.1104,-12 809.1104,-24 809.1104,-24 809.1104,-30 803.1104,-36 797.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"782.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 18&#45;&gt;19 -->\n",
       "<g id=\"edge19\" class=\"edge\">\n",
       "<title>18&#45;&gt;19</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M817.9965,-71.8292C811.9051,-62.6921 805.5555,-53.1678 799.9206,-44.7154\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"802.8072,-42.7355 794.348,-36.3565 796.9829,-46.6184 802.8072,-42.7355\"/>\n",
       "</g>\n",
       "<!-- 20 -->\n",
       "<g id=\"node21\" class=\"node\">\n",
       "<title>20</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M869.1104,-36C869.1104,-36 839.1104,-36 839.1104,-36 833.1104,-36 827.1104,-30 827.1104,-24 827.1104,-24 827.1104,-12 827.1104,-12 827.1104,-6 833.1104,0 839.1104,0 839.1104,0 869.1104,0 869.1104,0 875.1104,0 881.1104,-6 881.1104,-12 881.1104,-12 881.1104,-24 881.1104,-24 881.1104,-30 875.1104,-36 869.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"854.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 18&#45;&gt;20 -->\n",
       "<g id=\"edge20\" class=\"edge\">\n",
       "<title>18&#45;&gt;20</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M848.3223,-71.8292C849.2427,-63.2692 850.1997,-54.3693 851.0642,-46.3294\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"854.5473,-46.6734 852.1365,-36.3565 847.5874,-45.9249 854.5473,-46.6734\"/>\n",
       "</g>\n",
       "<!-- 22 -->\n",
       "<g id=\"node23\" class=\"node\">\n",
       "<title>22</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M962.1104,-36C962.1104,-36 932.1104,-36 932.1104,-36 926.1104,-36 920.1104,-30 920.1104,-24 920.1104,-24 920.1104,-12 920.1104,-12 920.1104,-6 926.1104,0 932.1104,0 932.1104,0 962.1104,0 962.1104,0 968.1104,0 974.1104,-6 974.1104,-12 974.1104,-12 974.1104,-24 974.1104,-24 974.1104,-30 968.1104,-36 962.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"947.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;22 -->\n",
       "<g id=\"edge22\" class=\"edge\">\n",
       "<title>21&#45;&gt;22</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M982.9965,-71.8292C976.9051,-62.6921 970.5555,-53.1678 964.9206,-44.7154\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"967.8072,-42.7355 959.348,-36.3565 961.9829,-46.6184 967.8072,-42.7355\"/>\n",
       "</g>\n",
       "<!-- 23 -->\n",
       "<g id=\"node24\" class=\"node\">\n",
       "<title>23</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M1034.1104,-36C1034.1104,-36 1004.1104,-36 1004.1104,-36 998.1104,-36 992.1104,-30 992.1104,-24 992.1104,-24 992.1104,-12 992.1104,-12 992.1104,-6 998.1104,0 1004.1104,0 1004.1104,0 1034.1104,0 1034.1104,0 1040.1104,0 1046.1104,-6 1046.1104,-12 1046.1104,-12 1046.1104,-24 1046.1104,-24 1046.1104,-30 1040.1104,-36 1034.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"1019.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;23 -->\n",
       "<g id=\"edge23\" class=\"edge\">\n",
       "<title>21&#45;&gt;23</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1013.3223,-71.8292C1014.2427,-63.2692 1015.1997,-54.3693 1016.0642,-46.3294\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1019.5473,-46.6734 1017.1365,-36.3565 1012.5874,-45.9249 1019.5473,-46.6734\"/>\n",
       "</g>\n",
       "<!-- 25 -->\n",
       "<g id=\"node26\" class=\"node\">\n",
       "<title>25</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.890196\" stroke=\"#000000\" d=\"M1245.2406,-150C1245.2406,-150 1102.9801,-150 1102.9801,-150 1096.9801,-150 1090.9801,-144 1090.9801,-138 1090.9801,-138 1090.9801,-84 1090.9801,-84 1090.9801,-78 1096.9801,-72 1102.9801,-72 1102.9801,-72 1245.2406,-72 1245.2406,-72 1251.2406,-72 1257.2406,-78 1257.2406,-84 1257.2406,-84 1257.2406,-138 1257.2406,-138 1257.2406,-144 1251.2406,-150 1245.2406,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"1110.7241\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">Coverage ≤ 22360.5</text>\n",
       "<text text-anchor=\"start\" x=\"1137.7192\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.178</text>\n",
       "<text text-anchor=\"start\" x=\"1116.709\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 285074</text>\n",
       "<text text-anchor=\"start\" x=\"1098.7954\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [28107, 256967]</text>\n",
       "<text text-anchor=\"start\" x=\"1135.4053\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 24&#45;&gt;25 -->\n",
       "<g id=\"edge25\" class=\"edge\">\n",
       "<title>24&#45;&gt;25</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1174.1104,-185.7677C1174.1104,-177.6172 1174.1104,-168.9283 1174.1104,-160.4649\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1177.6104,-160.3046 1174.1104,-150.3046 1170.6104,-160.3047 1177.6104,-160.3046\"/>\n",
       "</g>\n",
       "<!-- 28 -->\n",
       "<g id=\"node29\" class=\"node\">\n",
       "<title>28</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.701961\" stroke=\"#000000\" d=\"M1390.8099,-150C1390.8099,-150 1287.4108,-150 1287.4108,-150 1281.4108,-150 1275.4108,-144 1275.4108,-138 1275.4108,-138 1275.4108,-84 1275.4108,-84 1275.4108,-78 1281.4108,-72 1287.4108,-72 1287.4108,-72 1390.8099,-72 1390.8099,-72 1396.8099,-72 1402.8099,-78 1402.8099,-84 1402.8099,-84 1402.8099,-138 1402.8099,-138 1402.8099,-144 1396.8099,-150 1390.8099,-150\"/>\n",
       "<text text-anchor=\"start\" x=\"1304.917\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">FS ≤ 0.175</text>\n",
       "<text text-anchor=\"start\" x=\"1302.7192\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.355</text>\n",
       "<text text-anchor=\"start\" x=\"1293.3882\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 585</text>\n",
       "<text text-anchor=\"start\" x=\"1283.2607\" y=\"-92.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [450, 135]</text>\n",
       "<text text-anchor=\"start\" x=\"1305.0708\" y=\"-78.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 24&#45;&gt;28 -->\n",
       "<g id=\"edge28\" class=\"edge\">\n",
       "<title>24&#45;&gt;28</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1230.894,-185.7677C1244.8428,-176.1303 1259.8813,-165.7401 1274.1812,-155.8601\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1276.2639,-158.6754 1282.5017,-150.1115 1272.2848,-152.9163 1276.2639,-158.6754\"/>\n",
       "</g>\n",
       "<!-- 26 -->\n",
       "<g id=\"node27\" class=\"node\">\n",
       "<title>26</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M1145.1104,-36C1145.1104,-36 1115.1104,-36 1115.1104,-36 1109.1104,-36 1103.1104,-30 1103.1104,-24 1103.1104,-24 1103.1104,-12 1103.1104,-12 1103.1104,-6 1109.1104,0 1115.1104,0 1115.1104,0 1145.1104,0 1145.1104,0 1151.1104,0 1157.1104,-6 1157.1104,-12 1157.1104,-12 1157.1104,-24 1157.1104,-24 1157.1104,-30 1151.1104,-36 1145.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"1130.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 25&#45;&gt;26 -->\n",
       "<g id=\"edge26\" class=\"edge\">\n",
       "<title>25&#45;&gt;26</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1155.5779,-71.8292C1151.3915,-62.9806 1147.0333,-53.7689 1143.1303,-45.5193\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1146.2356,-43.899 1138.7951,-36.3565 1139.9081,-46.8927 1146.2356,-43.899\"/>\n",
       "</g>\n",
       "<!-- 27 -->\n",
       "<g id=\"node28\" class=\"node\">\n",
       "<title>27</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M1217.1104,-36C1217.1104,-36 1187.1104,-36 1187.1104,-36 1181.1104,-36 1175.1104,-30 1175.1104,-24 1175.1104,-24 1175.1104,-12 1175.1104,-12 1175.1104,-6 1181.1104,0 1187.1104,0 1187.1104,0 1217.1104,0 1217.1104,0 1223.1104,0 1229.1104,-6 1229.1104,-12 1229.1104,-12 1229.1104,-24 1229.1104,-24 1229.1104,-30 1223.1104,-36 1217.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"1202.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 25&#45;&gt;27 -->\n",
       "<g id=\"edge27\" class=\"edge\">\n",
       "<title>25&#45;&gt;27</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1185.9037,-71.8292C1188.5099,-63.173 1191.2207,-54.1692 1193.6626,-46.0587\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1197.0521,-46.9409 1196.5837,-36.3565 1190.3493,-44.9228 1197.0521,-46.9409\"/>\n",
       "</g>\n",
       "<!-- 29 -->\n",
       "<g id=\"node30\" class=\"node\">\n",
       "<title>29</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M1318.1104,-36C1318.1104,-36 1288.1104,-36 1288.1104,-36 1282.1104,-36 1276.1104,-30 1276.1104,-24 1276.1104,-24 1276.1104,-12 1276.1104,-12 1276.1104,-6 1282.1104,0 1288.1104,0 1288.1104,0 1318.1104,0 1318.1104,0 1324.1104,0 1330.1104,-6 1330.1104,-12 1330.1104,-12 1330.1104,-24 1330.1104,-24 1330.1104,-30 1324.1104,-36 1318.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"1303.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 28&#45;&gt;29 -->\n",
       "<g id=\"edge29\" class=\"edge\">\n",
       "<title>28&#45;&gt;29</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1323.9474,-71.8292C1320.5594,-63.0768 1317.0339,-53.9691 1313.8673,-45.7887\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1317.0901,-44.4186 1310.2161,-36.3565 1310.5621,-46.9456 1317.0901,-44.4186\"/>\n",
       "</g>\n",
       "<!-- 30 -->\n",
       "<g id=\"node31\" class=\"node\">\n",
       "<title>30</title>\n",
       "<path fill=\"#c0c0c0\" stroke=\"#000000\" d=\"M1390.1104,-36C1390.1104,-36 1360.1104,-36 1360.1104,-36 1354.1104,-36 1348.1104,-30 1348.1104,-24 1348.1104,-24 1348.1104,-12 1348.1104,-12 1348.1104,-6 1354.1104,0 1360.1104,0 1360.1104,0 1390.1104,0 1390.1104,0 1396.1104,0 1402.1104,-6 1402.1104,-12 1402.1104,-12 1402.1104,-24 1402.1104,-24 1402.1104,-30 1396.1104,-36 1390.1104,-36\"/>\n",
       "<text text-anchor=\"middle\" x=\"1375.1104\" y=\"-13.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">(...)</text>\n",
       "</g>\n",
       "<!-- 28&#45;&gt;30 -->\n",
       "<g id=\"edge30\" class=\"edge\">\n",
       "<title>28&#45;&gt;30</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1354.2733,-71.8292C1357.6613,-63.0768 1361.1868,-53.9691 1364.3534,-45.7887\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1367.6586,-46.9456 1368.0046,-36.3565 1361.1306,-44.4186 1367.6586,-46.9456\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x1117c0630>"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "graphviz_representation = tree.export_graphviz(tree_fit, out_file=None,\n",
    "                                               max_depth=3,\n",
    "                                               feature_names=ordered_features,\n",
    "                                               class_names = ['OK', 'error'],\n",
    "                                               filled=True, rounded=True, special_characters=True)\n",
    "graph = graphviz.Source(graphviz_representation)\n",
    "graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['Coverage',\n",
       " 'DP',\n",
       " 'FS',\n",
       " 'HRun',\n",
       " 'HaplotypeScore',\n",
       " 'MQ',\n",
       " 'QD',\n",
       " 'ReadPosRankSum']"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ordered_features2 = list(ordered_features)\n",
    "del ordered_features2[-2]\n",
    "train_X2 = balanced_fit[:,:-4]\n",
    "train_X2 = np.concatenate((train_X2, balanced_fit[:,-3:-2]), 1)\n",
    "ordered_features2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([0.        , 0.        , 0.04446258, 0.        , 0.        ,\n",
       "       0.        , 0.93627652, 0.0192609 ])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "estimator = tree.DecisionTreeClassifier(max_depth=3)\n",
    "tree_fit2 = estimator.fit(train_X2, train_Y)\n",
    "tree_fit2.feature_importances_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.40.1 (20161225.0304)\n",
       " -->\n",
       "<!-- Title: Tree Pages: 1 -->\n",
       "<svg width=\"1317pt\" height=\"414pt\"\n",
       " viewBox=\"0.00 0.00 1317.49 414.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 410)\">\n",
       "<title>Tree</title>\n",
       "<polygon fill=\"#ffffff\" stroke=\"transparent\" points=\"-4,4 -4,-410 1313.4854,-410 1313.4854,4 -4,4\"/>\n",
       "<!-- 0 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>0</title>\n",
       "<path fill=\"transparent\" stroke=\"#000000\" d=\"M731.0523,-406C731.0523,-406 580.2192,-406 580.2192,-406 574.2192,-406 568.2192,-400 568.2192,-394 568.2192,-394 568.2192,-340 568.2192,-340 568.2192,-334 574.2192,-328 580.2192,-328 580.2192,-328 731.0523,-328 731.0523,-328 737.0523,-328 743.0523,-334 743.0523,-340 743.0523,-340 743.0523,-394 743.0523,-394 743.0523,-400 737.0523,-406 731.0523,-406\"/>\n",
       "<text text-anchor=\"start\" x=\"619.8872\" y=\"-390.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">QD ≤ 0.005</text>\n",
       "<text text-anchor=\"start\" x=\"627.0308\" y=\"-376.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.5</text>\n",
       "<text text-anchor=\"start\" x=\"594.3413\" y=\"-362.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 1082975</text>\n",
       "<text text-anchor=\"start\" x=\"576.4277\" y=\"-348.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [541287, 541688]</text>\n",
       "<text text-anchor=\"start\" x=\"616.9307\" y=\"-334.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>1</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.898039\" stroke=\"#000000\" d=\"M566.766,-292C566.766,-292 424.5054,-292 424.5054,-292 418.5054,-292 412.5054,-286 412.5054,-280 412.5054,-280 412.5054,-226 412.5054,-226 412.5054,-220 418.5054,-214 424.5054,-214 424.5054,-214 566.766,-214 566.766,-214 572.766,-214 578.766,-220 578.766,-226 578.766,-226 578.766,-280 578.766,-280 578.766,-286 572.766,-292 566.766,-292\"/>\n",
       "<text text-anchor=\"start\" x=\"461.9585\" y=\"-276.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">FS ≤ 7.115</text>\n",
       "<text text-anchor=\"start\" x=\"459.2446\" y=\"-262.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.169</text>\n",
       "<text text-anchor=\"start\" x=\"438.2344\" y=\"-248.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 553908</text>\n",
       "<text text-anchor=\"start\" x=\"420.3208\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [502249, 51659]</text>\n",
       "<text text-anchor=\"start\" x=\"461.5962\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M600.5728,-327.7677C587.1732,-318.2204 572.7364,-307.9342 558.9863,-298.1373\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"560.7042,-295.0638 550.529,-292.1115 556.6423,-300.7647 560.7042,-295.0638\"/>\n",
       "<text text-anchor=\"middle\" x=\"554.6682\" y=\"-312.5664\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">True</text>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>8</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.921569\" stroke=\"#000000\" d=\"M909.8566,-292C909.8566,-292 743.4149,-292 743.4149,-292 737.4149,-292 731.4149,-286 731.4149,-280 731.4149,-280 731.4149,-226 731.4149,-226 731.4149,-220 737.4149,-214 743.4149,-214 743.4149,-214 909.8566,-214 909.8566,-214 915.8566,-214 921.8566,-220 921.8566,-226 921.8566,-226 921.8566,-280 921.8566,-280 921.8566,-286 915.8566,-292 909.8566,-292\"/>\n",
       "<text text-anchor=\"start\" x=\"739.5254\" y=\"-276.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">ReadPosRankSum ≤ &#45;0.496</text>\n",
       "<text text-anchor=\"start\" x=\"790.2446\" y=\"-262.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.137</text>\n",
       "<text text-anchor=\"start\" x=\"769.2344\" y=\"-248.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 529067</text>\n",
       "<text text-anchor=\"start\" x=\"751.3208\" y=\"-234.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [39038, 490029]</text>\n",
       "<text text-anchor=\"start\" x=\"787.9307\" y=\"-220.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;8 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>0&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M714.4842,-327.7677C728.9402,-318.1303 744.5256,-307.7401 759.3456,-297.8601\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"761.5895,-300.5707 767.9686,-292.1115 757.7066,-294.7463 761.5895,-300.5707\"/>\n",
       "<text text-anchor=\"middle\" x=\"763.0657\" y=\"-312.426\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">False</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>2</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.929412\" stroke=\"#000000\" d=\"M327.8566,-178C327.8566,-178 161.4149,-178 161.4149,-178 155.4149,-178 149.4149,-172 149.4149,-166 149.4149,-166 149.4149,-112 149.4149,-112 149.4149,-106 155.4149,-100 161.4149,-100 161.4149,-100 327.8566,-100 327.8566,-100 333.8566,-100 339.8566,-106 339.8566,-112 339.8566,-112 339.8566,-166 339.8566,-166 339.8566,-172 333.8566,-178 327.8566,-178\"/>\n",
       "<text text-anchor=\"start\" x=\"157.5254\" y=\"-162.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">ReadPosRankSum ≤ &#45;2.354</text>\n",
       "<text text-anchor=\"start\" x=\"208.2446\" y=\"-148.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.123</text>\n",
       "<text text-anchor=\"start\" x=\"187.2344\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 528075</text>\n",
       "<text text-anchor=\"start\" x=\"169.3208\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [493307, 34768]</text>\n",
       "<text text-anchor=\"start\" x=\"210.5962\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;2 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>1&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M412.405,-215.198C389.2247,-204.6699 363.8661,-193.1525 340.0446,-182.3331\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"341.2004,-179.014 330.6481,-178.0654 338.3056,-185.3874 341.2004,-179.014\"/>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>5</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.470588\" stroke=\"#000000\" d=\"M559.1934,-178C559.1934,-178 432.0781,-178 432.0781,-178 426.0781,-178 420.0781,-172 420.0781,-166 420.0781,-166 420.0781,-112 420.0781,-112 420.0781,-106 426.0781,-100 432.0781,-100 432.0781,-100 559.1934,-100 559.1934,-100 565.1934,-100 571.1934,-106 571.1934,-112 571.1934,-112 571.1934,-166 571.1934,-166 571.1934,-172 565.1934,-178 559.1934,-178\"/>\n",
       "<text text-anchor=\"start\" x=\"457.5493\" y=\"-162.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">FS ≤ 14.293</text>\n",
       "<text text-anchor=\"start\" x=\"459.2446\" y=\"-148.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.453</text>\n",
       "<text text-anchor=\"start\" x=\"442.1274\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 25833</text>\n",
       "<text text-anchor=\"start\" x=\"428.1069\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [8942, 16891]</text>\n",
       "<text text-anchor=\"start\" x=\"456.9307\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;5 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>1&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M495.6357,-213.7677C495.6357,-205.6172 495.6357,-196.9283 495.6357,-188.4649\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"499.1358,-188.3046 495.6357,-178.3046 492.1358,-188.3047 499.1358,-188.3046\"/>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.458824\" stroke=\"#000000\" d=\"M131.4075,-64C131.4075,-64 11.864,-64 11.864,-64 5.864,-64 -.136,-58 -.136,-52 -.136,-52 -.136,-12 -.136,-12 -.136,-6 5.864,0 11.864,0 11.864,0 131.4075,0 131.4075,0 137.4075,0 143.4075,-6 143.4075,-12 143.4075,-12 143.4075,-52 143.4075,-52 143.4075,-58 137.4075,-64 131.4075,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"35.2446\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.456</text>\n",
       "<text text-anchor=\"start\" x=\"22.0205\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 9962</text>\n",
       "<text text-anchor=\"start\" x=\"8\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [3503, 6459]</text>\n",
       "<text text-anchor=\"start\" x=\"32.9307\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>2&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M181.1993,-99.7647C165.1702,-89.8508 148.0012,-79.2318 132.1218,-69.4105\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"133.7939,-66.3293 123.448,-64.0458 130.1117,-72.2826 133.7939,-66.3293\"/>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>4</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.941176\" stroke=\"#000000\" d=\"M315.766,-64C315.766,-64 173.5054,-64 173.5054,-64 167.5054,-64 161.5054,-58 161.5054,-52 161.5054,-52 161.5054,-12 161.5054,-12 161.5054,-6 167.5054,0 173.5054,0 173.5054,0 315.766,0 315.766,0 321.766,0 327.766,-6 327.766,-12 327.766,-12 327.766,-52 327.766,-52 327.766,-58 321.766,-64 315.766,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"208.2446\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.103</text>\n",
       "<text text-anchor=\"start\" x=\"187.7505\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 518113</text>\n",
       "<text text-anchor=\"start\" x=\"169.3208\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [489804, 28309]</text>\n",
       "<text text-anchor=\"start\" x=\"210.5962\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 2&#45;&gt;4 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>2&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M244.6357,-99.7647C244.6357,-91.4537 244.6357,-82.6472 244.6357,-74.2305\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"248.1358,-74.2168 244.6357,-64.2169 241.1358,-74.2169 248.1358,-74.2168\"/>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>6</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.007843\" stroke=\"#000000\" d=\"M477.4075,-64C477.4075,-64 357.864,-64 357.864,-64 351.864,-64 345.864,-58 345.864,-52 345.864,-52 345.864,-12 345.864,-12 345.864,-6 351.864,0 357.864,0 357.864,0 477.4075,0 477.4075,0 483.4075,0 489.4075,-6 489.4075,-12 489.4075,-12 489.4075,-52 489.4075,-52 489.4075,-58 483.4075,-64 477.4075,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"389.0308\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.5</text>\n",
       "<text text-anchor=\"start\" x=\"364.1274\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 10755</text>\n",
       "<text text-anchor=\"start\" x=\"354\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [5359, 5396]</text>\n",
       "<text text-anchor=\"start\" x=\"378.9307\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;6 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>5&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M467.0343,-99.7647C460.5764,-90.9057 453.708,-81.4838 447.2109,-72.571\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"449.84,-70.236 441.1209,-64.2169 444.1834,-74.3595 449.84,-70.236\"/>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>7</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.690196\" stroke=\"#000000\" d=\"M645.6611,-64C645.6611,-64 519.6103,-64 519.6103,-64 513.6103,-64 507.6103,-58 507.6103,-52 507.6103,-52 507.6103,-12 507.6103,-12 507.6103,-6 513.6103,0 519.6103,0 519.6103,0 645.6611,0 645.6611,0 651.6611,0 657.6611,-6 657.6611,-12 657.6611,-12 657.6611,-52 657.6611,-52 657.6611,-58 651.6611,-64 645.6611,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"546.2446\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.362</text>\n",
       "<text text-anchor=\"start\" x=\"529.1274\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 15078</text>\n",
       "<text text-anchor=\"start\" x=\"515.623\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [3583, 11495]</text>\n",
       "<text text-anchor=\"start\" x=\"543.9307\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;7 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>5&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M527.5373,-99.7647C534.889,-90.7231 542.7174,-81.095 550.0958,-72.0204\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"552.8477,-74.1839 556.4407,-64.2169 547.4164,-69.7678 552.8477,-74.1839\"/>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>9</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.956863\" stroke=\"#000000\" d=\"M893.9796,-178C893.9796,-178 759.2919,-178 759.2919,-178 753.2919,-178 747.2919,-172 747.2919,-166 747.2919,-166 747.2919,-112 747.2919,-112 747.2919,-106 753.2919,-100 759.2919,-100 759.2919,-100 893.9796,-100 893.9796,-100 899.9796,-100 905.9796,-106 905.9796,-112 905.9796,-112 905.9796,-166 905.9796,-166 905.9796,-172 899.9796,-178 893.9796,-178\"/>\n",
       "<text text-anchor=\"start\" x=\"786.9941\" y=\"-162.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">QD ≤ 32.328</text>\n",
       "<text text-anchor=\"start\" x=\"794.1377\" y=\"-148.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.08</text>\n",
       "<text text-anchor=\"start\" x=\"769.2344\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 234679</text>\n",
       "<text text-anchor=\"start\" x=\"755.2139\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [9839, 224840]</text>\n",
       "<text text-anchor=\"start\" x=\"787.9307\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;9 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>8&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M826.6357,-213.7677C826.6357,-205.6172 826.6357,-196.9283 826.6357,-188.4649\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"830.1358,-188.3046 826.6357,-178.3046 823.1358,-188.3047 830.1358,-188.3046\"/>\n",
       "</g>\n",
       "<!-- 12 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>12</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.890196\" stroke=\"#000000\" d=\"M1151.766,-178C1151.766,-178 1009.5054,-178 1009.5054,-178 1003.5054,-178 997.5054,-172 997.5054,-166 997.5054,-166 997.5054,-112 997.5054,-112 997.5054,-106 1003.5054,-100 1009.5054,-100 1009.5054,-100 1151.766,-100 1151.766,-100 1157.766,-100 1163.766,-106 1163.766,-112 1163.766,-112 1163.766,-166 1163.766,-166 1163.766,-172 1157.766,-178 1151.766,-178\"/>\n",
       "<text text-anchor=\"start\" x=\"1040.9941\" y=\"-162.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">QD ≤ 36.016</text>\n",
       "<text text-anchor=\"start\" x=\"1044.2446\" y=\"-148.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.179</text>\n",
       "<text text-anchor=\"start\" x=\"1023.2344\" y=\"-134.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 294388</text>\n",
       "<text text-anchor=\"start\" x=\"1005.3208\" y=\"-120.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [29199, 265189]</text>\n",
       "<text text-anchor=\"start\" x=\"1041.9307\" y=\"-106.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;12 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>8&#45;&gt;12</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M913.6928,-213.9272C937.6329,-203.1824 963.6812,-191.4914 987.927,-180.6094\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"989.433,-183.7699 997.1231,-176.4821 986.5667,-177.3837 989.433,-183.7699\"/>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>10</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.956863\" stroke=\"#000000\" d=\"M821.9796,-64C821.9796,-64 687.2919,-64 687.2919,-64 681.2919,-64 675.2919,-58 675.2919,-52 675.2919,-52 675.2919,-12 675.2919,-12 675.2919,-6 681.2919,0 687.2919,0 687.2919,0 821.9796,0 821.9796,0 827.9796,0 833.9796,-6 833.9796,-12 833.9796,-12 833.9796,-52 833.9796,-52 833.9796,-58 827.9796,-64 821.9796,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"718.2446\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.077</text>\n",
       "<text text-anchor=\"start\" x=\"697.2344\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 233988</text>\n",
       "<text text-anchor=\"start\" x=\"683.2139\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [9380, 224608]</text>\n",
       "<text text-anchor=\"start\" x=\"715.9307\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;10 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>9&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M800.2344,-99.7647C794.2732,-90.9057 787.9332,-81.4838 781.9359,-72.571\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"784.801,-70.5595 776.3144,-64.2169 778.9934,-74.4674 784.801,-70.5595\"/>\n",
       "</g>\n",
       "<!-- 11 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>11</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.494118\" stroke=\"#000000\" d=\"M967.3353,-64C967.3353,-64 863.9362,-64 863.9362,-64 857.9362,-64 851.9362,-58 851.9362,-52 851.9362,-52 851.9362,-12 851.9362,-12 851.9362,-6 857.9362,0 863.9362,0 863.9362,0 967.3353,0 967.3353,0 973.3353,0 979.3353,-6 979.3353,-12 979.3353,-12 979.3353,-52 979.3353,-52 979.3353,-58 973.3353,-64 967.3353,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"879.2446\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.446</text>\n",
       "<text text-anchor=\"start\" x=\"869.9136\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 691</text>\n",
       "<text text-anchor=\"start\" x=\"859.7861\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [459, 232]</text>\n",
       "<text text-anchor=\"start\" x=\"881.5962\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 9&#45;&gt;11 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>9&#45;&gt;11</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M859.2707,-99.7647C866.7913,-90.7231 874.7997,-81.095 882.3478,-72.0204\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"885.1346,-74.1432 888.8385,-64.2169 879.7529,-69.6668 885.1346,-74.1432\"/>\n",
       "</g>\n",
       "<!-- 13 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>13</title>\n",
       "<path fill=\"#399de5\" fill-opacity=\"0.890196\" stroke=\"#000000\" d=\"M1151.766,-64C1151.766,-64 1009.5054,-64 1009.5054,-64 1003.5054,-64 997.5054,-58 997.5054,-52 997.5054,-52 997.5054,-12 997.5054,-12 997.5054,-6 1003.5054,0 1009.5054,0 1009.5054,0 1151.766,0 1151.766,0 1157.766,0 1163.766,-6 1163.766,-12 1163.766,-12 1163.766,-52 1163.766,-52 1163.766,-58 1157.766,-64 1151.766,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"1044.2446\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.176</text>\n",
       "<text text-anchor=\"start\" x=\"1023.2344\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 293772</text>\n",
       "<text text-anchor=\"start\" x=\"1005.3208\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [28721, 265051]</text>\n",
       "<text text-anchor=\"start\" x=\"1041.9307\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = error</text>\n",
       "</g>\n",
       "<!-- 12&#45;&gt;13 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>12&#45;&gt;13</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1080.6357,-99.7647C1080.6357,-91.4537 1080.6357,-82.6472 1080.6357,-74.2305\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1084.1358,-74.2168 1080.6357,-64.2169 1077.1358,-74.2169 1084.1358,-74.2168\"/>\n",
       "</g>\n",
       "<!-- 14 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>14</title>\n",
       "<path fill=\"#e58139\" fill-opacity=\"0.709804\" stroke=\"#000000\" d=\"M1297.3353,-64C1297.3353,-64 1193.9362,-64 1193.9362,-64 1187.9362,-64 1181.9362,-58 1181.9362,-52 1181.9362,-52 1181.9362,-12 1181.9362,-12 1181.9362,-6 1187.9362,0 1193.9362,0 1193.9362,0 1297.3353,0 1297.3353,0 1303.3353,0 1309.3353,-6 1309.3353,-12 1309.3353,-12 1309.3353,-52 1309.3353,-52 1309.3353,-58 1303.3353,-64 1297.3353,-64\"/>\n",
       "<text text-anchor=\"start\" x=\"1209.2446\" y=\"-48.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">gini = 0.348</text>\n",
       "<text text-anchor=\"start\" x=\"1199.9136\" y=\"-34.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">samples = 616</text>\n",
       "<text text-anchor=\"start\" x=\"1189.7861\" y=\"-20.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">value = [478, 138]</text>\n",
       "<text text-anchor=\"start\" x=\"1211.5962\" y=\"-6.8\" font-family=\"Helvetica,sans-Serif\" font-size=\"14.00\" fill=\"#000000\">class = OK</text>\n",
       "</g>\n",
       "<!-- 12&#45;&gt;14 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>12&#45;&gt;14</title>\n",
       "<path fill=\"none\" stroke=\"#000000\" d=\"M1141.1387,-99.7647C1156.2851,-89.9426 1172.4985,-79.4284 1187.5257,-69.6835\"/>\n",
       "<polygon fill=\"#000000\" stroke=\"#000000\" points=\"1189.7335,-72.4233 1196.2194,-64.0458 1185.9248,-66.5502 1189.7335,-72.4233\"/>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x1117c1e10>"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "graphviz_representation = tree.export_graphviz(tree_fit2, out_file=None,\n",
    "                                               max_depth=3,\n",
    "                                               feature_names=ordered_features2,\n",
    "                                               class_names = ['OK', 'error'],\n",
    "                                               filled=True, rounded=True, special_characters=True)\n",
    "graph = graphviz.Source(graphviz_representation)\n",
    "graph.render('1', format='png')\n",
    "graph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  },
  "name": "Decision_Trees.ipynb"
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
